Skip to content

fix(options): restore color compatibility aliases#1866

Open
ychampion wants to merge 1 commit into
eza-community:mainfrom
ychampion:fix-color-compatibility-aliases
Open

fix(options): restore color compatibility aliases#1866
ychampion wants to merge 1 commit into
eza-community:mainfrom
ychampion:fix-color-compatibility-aliases

Conversation

@ychampion

Copy link
Copy Markdown
Description

The clap migration stopped accepting --color=automatic even though ShowWhen::from_str still maps it to auto. It also dropped the existing --colour-scale and --colour-scale-mode spellings.

Restore those as hidden clap aliases, so existing command lines continue to work while help shows only the canonical values and options.

Fixes #1863

How Has This Been Tested?
  • cargo test
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • target/debug/eza --color=automatic --oneline Cargo.toml
  • target/debug/eza --colour-scale=size --colour-scale-mode=fixed --long Cargo.toml

Restore the hidden value and option aliases lost during the clap migration while keeping canonical names in help output.

Fixes: eza-community#1863

Constraint: Preserve command lines accepted before v0.23.5 without changing canonical help output.
Rejected: Add visible aliases to help | Legacy spellings should remain compatibility-only.
Confidence: high
Scope-risk: narrow
Directive: Keep these aliases hidden unless the public CLI documentation intentionally changes.
Tested: cargo test; cargo clippy --all-targets -- -D warnings; cargo fmt --all -- --check; parser regressions; CLI smoke tests.
Not-tested: nix flake check (Nix is unavailable in this environment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: 0.23.5 removed --color=automatic

1 participant